Buy Foundations through RevenueCat, and let entitlement expire - #602
Merged
Merged
Conversation
Implements the store behind all three pricing arms (#421). RevenueCat holds the entitlement, prices the plans and says which arm a learner is on; offeringFor stays the one home for what each arm sells. Entitlement stops being a one-shot answer: courseEntitlement watches the store's own change stream, so a subscription that lapses, is refunded or fails to renew locks the course with no restart. Settings -> Purchases becomes real: what you own and how it is billed, or the arm's offer, Restore, and a link out to Apple for a renewing plan. ADR-0024 supersedes ADR-0003. A build reaches a store only when given REVENUECAT_KEY, so the shipped app stays free by construction.
9 tasks
An owner who restarts bought nothing this run, so reading PurchasedTerm called a subscriber a one-time buyer and hid their way to cancel. PaymentsService gains activeTerm(), answered from RevenueCat's active entitlement and its productIdentifier. Purchases draws nothing until the store has named the plan: a wrong plan is worse than a beat of blank. PurchasedTerm stays what it was — the record of what this session bought, which is what the celebration is about.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The app could not take money. This builds the store behind all three pricing
arms — #421, which stays open until the sandbox criteria can actually be run.
The ruling is ADR-0024,
which supersedes ADR-0003.
Watch for
purchases_flutterAPI and compiles, but no call has run against RevenueCator StoreKit. Every judgement below is unverified until the account work in
docs/10-payments.mdis done.activeTerm()on the seam, rather than read fromPurchasedTerm— whichrecords only what this session bought, and so called a returning
subscriber a one-time buyer. Purchases now draws nothing until the store has
named the plan; a beat of blank beats a wrong plan. A SKU this build does
not know reads as bought outright, which is the reading that offers nothing
to cancel.
purchaseUpdatesis gone, replaced byentitlementChanges. It had noconsumer anywhere in
lib/; the stream that was actually needed is the onethat reports a lapse.
features/monetization/, notprofile/.The payments seam guard forbids anything outside the paywall layer reading
which arm a learner is on, and this screen's copy changes per arm. The
Settings file is the frame only.
customer info, so a throw means it has never answered; guessing
falsethere would lock out a paying learner.
GRANT_COURSEwins overREVENUECAT_KEYwhen both are passed, so adevelopment build that asked for the owned state still gets it.
Not here
the sandbox tester. Owner-only; the list is in
docs/10-payments.mdandMake the purchase real, through RevenueCat #421 holds them.
before anyone can tick them.
Checks
flutter test— 3197 pass, 15 new.the change-stream watch removed it fails
Expected: false, Actual: true.the pre-push hook.
purchases-ios-spm5.88.0, so the Podfile-free iOS setupsurvives the new dependency.